/* ********** Java example code snippet; code(15) ********** */
SyndFeed feed = new SyndFeedImpl(); /* new feed object */
feed.setFeedType(feedType); /* define the type of the feed */
feed.setTitle("This is a simple Sample");
feed.setLink("martinstoppacher.com");
feed.setDescription("My favorite webpages; format:_"+feedType);
List entries = new ArrayList(); /* entries array object ...*/
SyndEntry entry;
SyndContent description;
entry = new SyndEntryImpl(); // an other entry opbject
entry.setTitle("The ooRexx Web Page");
entry.setLink("http://www.oorexx.org/");
entry.setPublishedDate(DATE_PARSER.parse("2009-12-26"));
description = new SyndContentImpl();
description.setType("text/html");
description.setValue("<p>Open Object Rexx version 4.0.0 is now available."
+" Visit the announcement page for More information."
+" </p><p>For details check the <a href=\"http://www.oorexx.org/\">ooRexx"
+" Web Page</a></p>");
entry.setDescription(description); // add the description object to the entry object
entries.add(entry);//adds the entry object to the entries array
feed.setEntries(entries); // add the entries array to the feed
SyndFeedOutput output = new SyndFeedOutput(); // simple output to the system
output.output(feed,new PrintWriter(System.out));
/* // optional writer part
Writer writer = new FileWriter(fileName);
SyndFeedOutput output = new SyndFeedOutput();
output.output(feed,writer);
writer.close();
System.out.println("The feed has been written to the file ["+fileName+"]");
*/
/* ************************************************************************************** */